package com.mall.ums.controller;

import com.mall.model.domain.ums.MemberLevel;
import com.mall.ums.service.MemberLevelService;
import com.mall.utils.R;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @author clutchcitylee
 * @create 2023-03-13-11:16
 */
@RestController
@RequestMapping("/memberLevel")
public class MemberLevelController {

    @Autowired
    private MemberLevelService memberLevelService;

    /**
     * 查询所有会员等级
     *
     * @param defaultStatus
     * @return
     */
    @GetMapping("/list")
    public R<List<MemberLevel>> list(Integer defaultStatus) {
        List<MemberLevel> memberLevels = memberLevelService.list();
        return R.success(memberLevels);
    }

}
